package com.glink.manage.dto.org;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

import javax.validation.constraints.Max;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;

/**
 * Created by IntelliJ IDEA.
 *
 * @Author : qiushaoshan
 * @create 2024/6/18 13:49
 */
@Data
@ToString
@NoArgsConstructor
public class OrgSaveRequestDTO {

    @ApiModelProperty(name = "pid", notes = "父节点")
    @NotBlank(message = "上级单位不能为空")
    private String pid;

    @ApiModelProperty(name = "name", notes = "组织名称", required = true)
    @NotBlank(message = "组织名称不能为空")
    @Size(max = 250, message = "组织名称不能超过250个字符")
    private String name;

    @ApiModelProperty(name = "orgCode", notes = "组织编码", required = true)
    @NotBlank(message = "组织编码不能为空")
    @Size(max = 128, message = "组织编码不能超过128个字符")
    private String orgCode;

    @ApiModelProperty(name = "orgDesc", notes = "组织描述")
    @Size(max = 512, message = "组织编码不能超过512个字符")
    private String orgDesc;

    @ApiModelProperty(name = "ifEngDepartment", notes = "是否工程部, 0否，1是")
    private String ifEngDepartment;

    @ApiModelProperty(name = "orgOrder", notes = "顺序")
    @Max(value = 10000, message = "顺序号最大支持10000以内")
    private Integer orgOrder;

    @ApiModelProperty(name = "isAvailable", notes = "是否启用")
    private String isAvailable;
}
